﻿const hold = () => {
    alert('hold');
}

const invoket_id = (version) => {
    return version;
}

const getLocal = (key,pas) => {
    var es = localStorage.getItem(key);
    if (es != null && pas) {
        return JSON.parse(es);
    } else {
        return es;
    }
}
const setLocal = (key, value, pas) => {
    var val = '';
    if (pas) {
        val = JSON.stringify(value);
    } else {
        val = value;
    }
    localStorage.setItem(key, val);
}

const getSession = (key, pas) => {
    var es = sessionStorage.getItem(key);
    if (es != null && pas) {
        return JSON.parse(es);
    } else {
        return es;
    }
}

const setSession = (key, value, pas) => {
    var val = '';
    if (pas) {
        val = JSON.stringify(value);
    } else {
        val = value;
    }
    sessionStorage.setItem(key, val);
}

const goto = (path) => {
    window.location.href = path;
}

const paySdk = {
    wxpay: {

    },
    alipay: {

    },
    tlpay: {

    }
}

const httpCall = (url,data,method,fun_) => {

}